//    Copyright (C) Kherty.  All rights reserved.
using System.Windows.Media;

namespace OpenLS.Drawing
{
    internal class ShadeTransform : PercentTransform
    {
        protected override string XmlName
        {
            get { return "shade"; }
        }

        public override Color Apply(Color c)
        {
            float r = (float) Ratio;
            return Color.FromScRgb(c.ScA, c.ScR*r,
                                   c.ScG*r,
                                   c.ScB*r);
        }
    }
}